﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MadProps.Templating
{
    public class TemplateSuggestionArgs
    {
        public System.Windows.Controls.Control Target { get; private set; }
        public Type TargetType { get { return Target.GetType(); } }
        public IProp Prop { get; private set; }

        readonly LinkedList<object> resourceSuggestions = new LinkedList<object>();
        public IEnumerable<object> ResourceSuggestions { get { return resourceSuggestions; } }

        public TemplateSuggestionArgs(System.Windows.Controls.Control target, IProp prop)
        {
            this.Target = target.ThrowIfNull("target");
            this.Prop = prop.ThrowIfNull("prop");
        }

        public void SuggestResource(object resourceKey)
        {
            resourceSuggestions.AddLast(resourceKey);
        }
    }
}
